chore(ci): declare explicit permissions for read-default rollout#439
Merged
Merged
Conversation
The publish-clm.yaml and publish-scaffold.yaml workflows upload release binaries via curl using the default GITHUB_TOKEN. Once the org-wide flip to read-default GITHUB_TOKEN lands, the asset upload requests will 403 unless the workflows explicitly declare contents: write. This narrows the token's effective scope (was implicit write-everything; becomes contents:write only) without changing happy-path behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Declare explicit
permissions: contents: writeon the two release-asset upload workflows so they keep working after the org-wide flip to read-defaultGITHUB_TOKEN.Workflows touched:
.github/workflows/publish-clm.yaml.github/workflows/publish-scaffold.yamlWhy
OSPO hardening — Finding 1:
restrict_default_workflow_permissions = truewill be enabled fleet-wide on the SAP CS-DevOps OSPO repo set. Both workflows upload binaries to the release viacurl -H "Authorization: Bearer \${{ secrets.GITHUB_TOKEN }}"toupload_url. Asset upload requirescontents: write; without it the curl will 403 under the read-only default.Risk
Low. Token scope is narrowed (was implicit write-everything; becomes
contents: writeonly). Behavior unchanged on the happy path.Test plan
clm-*and the scaffold archive without 403.